//
//  ViewController.m
//  UI16_CycleImageByCollectionView
//
//  Created by Hanlingyu on 16/8/4.
//  Copyright © 2016年 ltq. All rights reserved.
//

#import "ViewController.h"
#import "LtqCycleImageCollectionViewCell.h"
#import "LtqCucleImage.h"
#define kControllectionView @"resue"
#define kWidth self.view.frame.size.width
#define kColor [UIColor colorWithRed:arc4random() % 255 / 256.0 green:arc4random() % 255 / 256.0 blue:arc4random() % 255 / 256.0 alpha:1];
@interface ViewController ()

@property (nonatomic, strong) NSMutableArray *imageArray;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    
    [self handleImageArray];
    

    
    LtqCucleImage *cycle = [[LtqCucleImage alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, 500)];
    cycle.imageArray = _imageArray;
    [self.view addSubview:cycle];
    
    
    
    
    
    
}

- (void)handleImageArray {
    
    self.imageArray = [NSMutableArray array];
    for (int i = 1; i < 11; i++) {
        [_imageArray addObject:[UIImage imageNamed:[NSString stringWithFormat:@"h%d.jpeg", i]]];
    }
    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
